package club.gskj.gulimall.member.service;

import club.gskj.gulimall.member.exception.PhoneExistException;
import club.gskj.gulimall.member.exception.UserNameExistException;
import club.gskj.gulimall.member.vo.MemberLoginVo;
import club.gskj.gulimall.member.vo.MemberRegisterVo;
import club.gskj.gulimall.member.vo.SocialUser;
import com.baomidou.mybatisplus.extension.service.IService;
import club.gskj.common.utils.PageUtils;
import club.gskj.gulimall.member.entity.MemberEntity;

import java.util.Map;

/**
 * 会员
 *
 * @author 康纳-connor
 * @email 2417039231@gmail.com
 * @date 2020-12-27 15:51:57
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 注册用户信息
     *
     * @param memberRegisterVo
     */
    void register(MemberRegisterVo memberRegisterVo);


    /**
     * 检查手机号是否唯一
     *
     * @param email
     * @return
     */
    void checkPhoneUnique(String phone) throws PhoneExistException;

    /**
     * 检查用户名是否唯一
     *
     * @param email
     * @return
     */
    void checkUserNameUnique(String userName) throws UserNameExistException;

    /***
     *
     * @param vo
     * @return club.gskj.gulimall.member.entity.MemberEntity
     * @author 康纳-connor
     * @creed: Talk is cheap,show me the code
     * @date 21.3.16 21:44
     * @Description 用户登陆 账户密码校验
     */
    MemberEntity login(MemberLoginVo vo);

    /***
     *
     * @param vo  微博社交用户信息
     * @return club.gskj.gulimall.member.entity.MemberEntity
     * @author 康纳-connor
     * @creed: Talk is cheap,show me the code
     * @date 21.3.18 23:04
     * @Description
     */
    MemberEntity login(SocialUser vo) throws Exception;
}

